import { request } from "@/common/request";
// +---------------------
// | 商家数据
// +---------------------

/**
 * 根据当前用户取商家信息
 * @returns
 */
export function getBusinessDetailById() {
  return request({
    url: `/kingon-customer/business/getDetailById`,
    method: "get",
  });
}

/**
 * 通过商家id获取商家信息
 * @returns
 */
export function getBusinessByBusinessId(data: any) {
  return request({
    url: `/kingon-customer/business/getDetailByBusinessId`,
    method: "get",
    data,
  });
}

/**
 * 商家评级信息
 * @returns
 */
export function getBusinessGrade(data: any) {
  return request({
    url: `/kingon-customer/business/businessGrade`,
    method: "get",
    data,
  });
}

/**
 *  各种数据聚合接口  dataType 1原料类别2原料3餐补等级4餐别设置5菜品原料成分）
 */
export function sourceDataItems(data: any) {
  return request({
    url: `/kingon-service-base/kingon-sale/materialRecipeLevel/selectByApp`,
    method: "get",
    data,
  });
}

export function itemsDataSelect(data: any) {
  return request({
    url: `/kingon-service-base/kingon-sale/materialRecipeLevel/select`,
    method: "get",
    data,
  });
}


/**
 * 查询商家支付应用配置
 */
export function getBusinessPayConfigPage(data: any) {
  return request({
    url: `/kingon-pay/payApp/page`,
    method: "get",
    data,
  });
}